"""
频率列表, 包含频率值, 判定范围, 和音名. 以十二平均律计算, 以A4为440Hz为基准计算.
完整版包含钢琴88键对应音高, 精简版为小提琴常用音高.

包含列表：
    freq_lis: A0~C8
    freq_lis_small: G3~C6
        均为二维数组, 子列表为:
        [音高, (判定范围), 音名]
        [float, tuple, string]
"""



freq_lis = [
    [27.50, (26.72, 28.31), 'A0'],
    [29.14, (28.31, 29.99), 'A#0'],
    [30.87, (29.99, 31.77), 'B0'],
    [32.70, (31.77, 33.66), 'C1'],
    [34.65, (33.66, 35.66), 'C#1'],
    [36.71, (35.66, 37.78), 'D1'],
    [38.89, (37.78, 40.03), 'D#1'],
    [41.20, (40.03, 42.41), 'E1'],
    [43.65, (42.41, 44.93), 'F1'],
    [46.25, (44.93, 47.60), 'F#1'],
    [49.00, (47.60, 50.44), 'G1'],
    [51.91, (50.44, 53.43), 'G#1'],
    [55.00, (53.43, 56.61), 'A1'],
    [58.27, (56.61, 59.98), 'A#1'],
    [61.74, (59.98, 63.54), 'B1'],
    [65.41, (63.54, 67.32), 'C2'],
    [69.30, (67.32, 71.33), 'C#2'],
    [73.42, (71.33, 75.57), 'D2'],
    [77.78, (75.57, 80.06), 'D#2'],
    [82.41, (80.06, 84.82), 'E2'],
    [87.31, (84.82, 89.87), 'F2'],
    [92.50, (89.87, 95.21), 'F#2'],
    [98.00, (95.21, 100.87), 'G2'],
    [103.83, (100.87, 106.87), 'G#2'],
    [110.00, (106.87, 113.22), 'A2'],
    [116.54, (113.22, 119.96), 'A#2'],
    [123.47, (119.96, 127.09), 'B2'],
    [130.81, (127.09, 134.65), 'C3'],
    [138.59, (134.65, 142.65), 'C#3'],
    [146.83, (142.65, 151.13), 'D3'],
    [155.56, (151.13, 160.12), 'D#3'],
    [164.81, (160.12, 169.64), 'E3'],
    [174.61, (169.64, 179.73), 'F3'],
    [185.00, (179.73, 190.42), 'F#3'],
    [196.00, (190.42, 201.74), 'G3'],
    [207.65, (201.74, 213.74), 'G#3'],
    [220.00, (213.74, 226.45), 'A3'],
    [233.08, (226.45, 239.91), 'A#3'],
    [246.94, (239.91, 254.18), 'B3'],
    [261.63, (254.18, 269.29), 'C4'],
    [277.18, (269.29, 285.30), 'C#4'],
    [293.66, (285.30, 302.27), 'D4'],
    [311.13, (302.27, 320.24), 'D#4'],
    [329.63, (320.24, 339.29), 'E4'],
    [349.23, (339.29, 359.46), 'F4'],
    [369.99, (359.46, 380.84), 'F#4'],
    [392.00, (380.84, 403.48), 'G4'],
    [415.30, (403.48, 427.47), 'G#4'],
    [440.00, (427.47, 452.89), 'A4'],
    [466.16, (452.89, 479.82), 'A#4'],
    [493.88, (479.82, 508.36), 'B4'],
    [523.25, (508.36, 538.58), 'C5'],
    [554.37, (538.58, 570.61), 'C#5'],
    [587.33, (570.61, 604.54), 'D5'],
    [622.25, (604.54, 640.49), 'D#5'],
    [659.26, (640.49, 678.57), 'E5'],
    [698.46, (678.57, 718.92), 'F5'],
    [739.99, (718.92, 761.67), 'F#5'],
    [783.99, (761.67, 806.96), 'G5'],
    [830.61, (806.96, 854.95), 'G#5'],
    [880.00, (854.95, 905.79), 'A5'],
    [932.33, (905.79, 959.65), 'A#5'],
    [987.77, (959.65, 1016.71), 'B5'],
    [1046.50, (1016.71, 1077.17), 'C6'],
    [1108.73, (1077.17, 1141.22), 'C#6'],
    [1174.66, (1141.22, 1209.08), 'D6'],
    [1244.51, (1209.08, 1280.97), 'D#6'],
    [1318.51, (1280.97, 1357.15), 'E6'],
    [1396.91, (1357.15, 1437.85), 'F6'],
    [1479.98, (1437.85, 1523.34), 'F#6'],
    [1567.98, (1523.34, 1613.93), 'G6'],
    [1661.22, (1613.93, 1709.90), 'G#6'],
    [1760.00, (1709.90, 1811.57), 'A6'],
    [1864.66, (1811.57, 1919.29), 'A#6'],
    [1975.53, (1919.29, 2033.42), 'B6'],
    [2093.00, (2033.42, 2154.33), 'C7'],
    [2217.46, (2154.33, 2282.44), 'C#7'],
    [2349.32, (2282.44, 2418.16), 'D7'],
    [2489.02, (2418.16, 2561.95), 'D#7'],
    [2637.02, (2561.95, 2714.29), 'E7'],
    [2793.83, (2714.29, 2875.69), 'F7'],
    [2959.96, (2875.69, 3046.69), 'F#7'],
    [3135.96, (3046.69, 3227.85), 'G7'],
    [3322.44, (3227.85, 3419.79), 'G#7'],
    [3520.00, (3419.79, 3623.14), 'A7'],
    [3729.31, (3623.14, 3838.59), 'A#7'],
    [3951.07, (3838.59, 4066.84), 'B7'],
    [4186.01, (4066.84, 4308.67), 'C8']
]

freq_lis_small = [
    [196.00, (190.42, 201.74), 'G3'],
    [207.65, (201.74, 213.74), 'G#3'],
    [220.00, (213.74, 226.45), 'A3'],
    [233.08, (226.45, 239.91), 'A#3'],
    [246.94, (239.91, 254.18), 'B3'],
    [261.63, (254.18, 269.29), 'C4'],
    [277.18, (269.29, 285.30), 'C#4'],
    [293.66, (285.30, 302.27), 'D4'],
    [311.13, (302.27, 320.24), 'D#4'],
    [329.63, (320.24, 339.29), 'E4'],
    [349.23, (339.29, 359.46), 'F4'],
    [369.99, (359.46, 380.84), 'F#4'],
    [392.00, (380.84, 403.48), 'G4'],
    [415.30, (403.48, 427.47), 'G#4'],
    [440.00, (427.47, 452.89), 'A4'],
    [466.16, (452.89, 479.82), 'A#4'],
    [493.88, (479.82, 508.36), 'B4'],
    [523.25, (508.36, 538.58), 'C5'],
    [554.37, (538.58, 570.61), 'C#5'],
    [587.33, (570.61, 604.54), 'D5'],
    [622.25, (604.54, 640.49), 'D#5'],
    [659.26, (640.49, 678.57), 'E5'],
    [698.46, (678.57, 718.92), 'F5'],
    [739.99, (718.92, 761.67), 'F#5'],
    [783.99, (761.67, 806.96), 'G5'],
    [830.61, (806.96, 854.95), 'G#5'],
    [880.00, (854.95, 905.79), 'A5'],
    [932.33, (905.79, 959.65), 'A#5'],
    [987.77, (959.65, 1016.71), 'B5'],
    [1046.50, (1016.71, 1077.17), 'C6']
]


if __name__ == "__main__":  
    print(freq_lis)
    print(freq_lis_small)
